package com.wtwd.campus.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wtwd.campus.entity.School;
import com.wtwd.campus.model.vo.SchoolVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author mjy
 * @date 2021/06/11
 * @description
 */
@Mapper
public interface SchoolMapper extends BaseMapper<School> {
    Integer getSchoolCountByOrgCode(@Param("orgCode") String orgCode);

    List<Integer> getSchoolIdListByOrgCode(@Param("orgCode") String orgCode);

    IPage<SchoolVO> queryList(@Param("page") IPage page, @Param("school") School school);

    List<Map<String, Object>> getSchoolNamesBySchoolIds(@Param("ids") String[] ids);

    School getSchoolInfoByOrgCode(@Param("orgCode") String orgCode);

    School getSchoolInfoBySchoolId(@Param("schoolId") Integer schoolId);

    School getSchoolInfoBySchoolName(@Param("schoolName") String schoolName,@Param("orgCode") String orgCode);

    School getSchoolInfoById(@Param("id") Integer id);
}
